package base.enumDemo;

import static base.enumDemo.ColorsType.GREEN;
import static base.enumDemo.ColorsType.RED;

public class EnumOrdinalDemo {

    public static void main(String[] args) {

        circulateColors();
    }


    public static void getOrdinal() {     //ordinal()
        ColorsType currentColor = RED;
        ColorsType currentColor2 = GREEN;

        System.out.println("current color ordinal is " + currentColor2.ordinal());

    }


    public static void circulateColors(){

        for (ColorsType c: ColorsType.values()){

            System.out.print(c.ordinal()+"  :  "+c.getContent()+"  . ");
            System.out.println(c.toString());
        }

    }






}
